package com.cm.log_process.log_common.entity;

/**
*@Date 2019/12/10
*@Author 郭兆鹏
*作用:统一返回结果类
*
*/
public class Result<T> {
    private Integer code;
    private PageResult<T> data;
    private String message;


    public Result() {
    }

    public Result(Integer code, String message) {
        this.code = code;

        this.message = message;
    }

    public Result(Integer code,PageResult<T> data, String message) {
        this.code = code;
        this.data = data;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public PageResult<T> getData() {
        return data;
    }

    public void setData(PageResult<T> data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "Result{" +
                "code=" + code +
                ", data=" + data +
                ", message='" + message + '\'' +
                '}';
    }
}
